package designPatterns.P06_桥接模式_Bridge.phones;

import designPatterns.P06_桥接模式_Bridge.phones.brands.Brand;

/**
 * @author d11yu
 */
public abstract class Phone {
    private final Brand brand;

    public Phone(Brand brand) {
        this.brand = brand;
    }

    public void open() {
        System.out.println(this.brand.getBrand() + " open");
    }

    public void close() {
        System.out.println(this.brand.getBrand() + " close");
    }

    public void call() {
        System.out.println(this.brand.getBrand() + " call");
    }

    public Brand getBrand() {
        return brand;
    }
}
